<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>激活会员账号</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="__PUBLIC__/Theme1/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/animate.min.css" rel="stylesheet">
    
    <link href="__PUBLIC__/Theme1/static/plupload/upfiless.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/Theme1/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/Theme1/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css"
          rel="stylesheet">
    <link rel="stylesheet" href="__PUBLIC__/Theme1/css/goods_buy_AdminLTE.min.css">
    <style>
        body {
            font-family: "微软雅黑", "宋体", "新宋体", Verdana, Geneva, sans-serif;
        }
    </style>
</head>
<body class="gray-bg">
<section class="content-header" style="padding-left: 50px">
    <h1>
        激活账号
        <small>active member</small>
    </h1>
</section>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="callout callout-info" style="margin-left: 30px;margin-bottom: 1px"><p>激活会员将扣除您的注册币，激活会员时请务必谨慎</p></div>
    <div class="row">
        <div class="col-sm-12" style="margin-left: 30px">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>激活会员账号</h5>
                    <div class="ibox-tools">
                    </div>
                </div>
                <div class="ibox-content">
                    <form method="post" action="" class="form-horizontal" id="form-admin-add"
                          enctype="multipart/form-data"
                          onsubmit="return check_active_member($('#txt_active_member').val())">

                        <div class="form-group">
                            <label class="col-sm-1 control-label">会员编号</label>
                            <div class="col-sm-3">
                                <input type="text" value="<{$userarr.loginname}>" name="txt_loginname"
                                       id="txt_loginname" readonly="readonly" class="form-control"
                                       style="margin-top: -10px"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label">注册币余额</label>
                            <div class="col-sm-3">

                                <input type="text" value="<{$userarr.amount}>" name="txt_amount" id="txt_amount"
                                       readonly="readonly" class="form-control" style="margin-top: -10px"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label">激活会员账号</label>
                            <div class="col-sm-3">
								<if condition="$jihuo_name">
									<input type="text" name="txt_active_member" id="txt_active_member"class="form-control valid" value="<{$jihuo_name}>"style="margin-top: -10px" onblur="check_active_member(this.value)"/>
								<else />
							
                                <input type="text" name="txt_active_member" id="txt_active_member"
                                       class="form-control valid" style="margin-top: -10px"
                                       onblur="check_active_member(this.value)"/>
                                <div style="margin-top: 5px"></div>
								</if>
                                <span id="active_member_notice" style="color: red"></span>
		
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label">激活所需注册币</label>
                            <div class="col-sm-3">
                                <input type="text" name="txt_active_amount" id="txt_active_amount"
                                       value="<{$active_amount}>" readonly="readonly" class="form-control"
                                       style="margin-top: -10px"/>
                                <span id="active_amount_notice" style="color: red"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label">激活后自动续费</label>
                            <div class="col-sm-3">
                                <input type="text" value="<{$active_day_num}>天" readonly="readonly" class="form-control"
                                       style="margin-top: -10px"/>
                            </div>
                        </div>
                        <if condition="$userarr.is_baodan gt 0">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">报单服务提成</label>
                            <div class="col-sm-3">
                                <input type="text" value="您已成为报单中心,可获得激活所需注册币的<{$baodan_ratio}>%服务提成" readonly="readonly" class="form-control"
                                       style="margin-top: -10px"/>
                            </div>
                        </div>
                        </if>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="submit">确定激活</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="__PUBLIC__/Theme1/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/Theme1/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/Theme1/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/Theme1/js/plugins/iCheck/icheck.min.js"></script>

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/jquery.validate.min.js"></script>

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/messages_zh.min.js"></script>

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/validate-methods.js"></script>
<script type="text/javascript" src="__PUBLIC__/Theme1/lib/webuploader/0.1.5/webuploader.min.js"></script>

<script>
    $(document).ready(function () {
        $('#txt_active_member').focus();
    });
</script>


<script type="text/javascript">

    function check_active_member(active_member) {
        var amount=$('#txt_active_amount').val();
		//alert(amount);
        var active_amount=$('#txt_active_amount').val();
        if(active_amount>amount){
            $("#active_amount_notice").html("注册币余额不足");
            return false;
        }
        var jiedian = active_member;
        if (jiedian.length > 0) {
            htmlobj = $.ajax({url: "__URL__/check_active_member?username=" + escape(jiedian), async: false});
            if (escape(htmlobj.responseText) == "0") {
                $("#active_member_notice").html("   要激活的会员账号不存在或已被激活");
                $("#txt_active_member").val('').focus();
                return false;
            }
            if (escape(htmlobj.responseText) == "1") {
                $("#active_member_notice").html("   输入正确,请点击按钮激活");
                return true;
            }
        } else {
            $("#active_member_notice").html("   请输入要激活的账号");
            $("#txt_active_member").val('').focus();
            return false;
        }


    }
</script>

</body>

</html>
